package com.jkoss.dao.kc;

import java.util.List;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.ResultMap;
import org.apache.ibatis.annotations.Select;
import org.springframework.web.bind.annotation.RequestMapping;

import com.jkoss.pojo.kc.Coursemodel;
import com.jkoss.pojo.kc.CoursemodelExample;
import com.jkoss.tool.Page;

public interface CoursemodelMapper {
  
	@Select("select a.*, b.kcname from  t_coursemodel a,t_course b where a.kcid=b.kcid")
	@RequestMapping("com.jkoss.dao.kc.CoursemodelMapper.BaseResultMap2")
	List<Coursemodel> findListCourse(Page<Coursemodel> page);
 
	@Select("select a.*, b.kcname from  t_coursemodel a,t_course b where a.kcid=b.kcid "
			+ "and a.kcid=${params.kcid}")
	@RequestMapping("com.jkoss.dao.kc.CoursemodelMapper.BaseResultMap2")
	List<Coursemodel> findListCourse2(Page<Coursemodel> page);
	
	@Select("select a.*  from  t_coursemodel a where a.kcid=${kcid} and a.kcmdelName='${kcmdelName}'")
	@ResultMap("com.jkoss.dao.kc.CoursemodelMapper.BaseResultMap2")
	Coursemodel findTheSame(@Param("kcid") Integer kcid, @Param("kcmdelName") String kcmdelName);
	
	int countByExample(CoursemodelExample example);

    int deleteByExample(CoursemodelExample example);

    int deleteByPrimaryKey(Integer kcmdelid);
    
    
    int insert(Coursemodel record);

    int insertSelective(Coursemodel record);

    List<Coursemodel> selectByExample(CoursemodelExample example);

    Coursemodel selectByPrimaryKey(Integer kcmdelid);

    int updateByExampleSelective(@Param("record") Coursemodel record, @Param("example") CoursemodelExample example);

    int updateByExample(@Param("record") Coursemodel record, @Param("example") CoursemodelExample example);

    int updateByPrimaryKeySelective(Coursemodel record);

    int updateByPrimaryKey(Coursemodel record);

    @Select("select a.*, b.kcname from  t_coursemodel a,t_course b where a.kcid=b.kcid")
    @RequestMapping("com.jkoss.dao.kc.CoursemodelMapper.BaseResultMap2")
	List<Coursemodel> findByAll();

    @Select("select a.*,b.kcname FROM  t_coursemodel a,t_course b where a.kcid=b.kcid "
    		+ "and a.kcmdelid=#{kcmdelid}")
    @RequestMapping("com.jkoss.dao.kc.CoursemodelMapper.BaseResultMap2")
	 Coursemodel findByOne(@Param("kcmdelid") Integer kcmdelid);

	int insert2(Coursemodel csm);

	int updateByPrimaryKey2(Coursemodel csm);
    
	@Select("select *  from  t_coursemodel")
	@RequestMapping("com.jkoss.dao.kc.CoursemodelMapper.BaseResultMap")
	List<Coursemodel> findByAll2();

	

	


	
     


	
}